{template 'content', 'header'}
<script type="text/javascript" src="{JS_PATH}member_common.js"></script>
<script type="text/javascript" src="{JS_PATH}formvalidator.js" charset="UTF-8"></script>
<script type="text/javascript" src="{JS_PATH}formvalidatorregex.js" charset="UTF-8"></script>
<script type="text/javascript" src="{JS_PATH}dialog.js"></script>
<link href="{CSS_PATH}dialog_simp.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
<!--
$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});

	$("#username").formValidator({onshow:"{L('input').L('username')}",onfocus:"{L('username').L('between_2_to_20')}"}).inputValidator({min:2,max:20,onerror:"{L('username').L('between_2_to_20')}"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"{L('username').L('format_incorrect')}"}).ajaxValidator({
	    type : "get",
		url : "",
		data :"m=member&c=index&a=public_checkname_ajax",
		datatype : "html",
		async:'false',
		success : function(data){
            if( data == "1" ) {
                return true;
			} else {
                return false;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "{L('deny_register').L('or').L('user_already_exist')}",
		onwait : "{L('connecting_please_wait')}"
	});
	$("#password").formValidator({onshow:"{L('input').L('password')}",onfocus:"{L('password').L('between_6_to_20')}"}).inputValidator({min:6,max:20,onerror:"{L('password').L('between_6_to_20')}"});
	$("#pwdconfirm").formValidator({onshow:"{L('input').L('cofirmpwd')}",onfocus:"{L('passwords_not_match')}",oncorrect:"{L('passwords_match')}"}).compareValidator({desid:"password",operateor:"=",onerror:"{L('passwords_not_match')}"});
	$("#email").formValidator({onshow:"{L('input').L('email')}",onfocus:"{L('email').L('format_incorrect')}",oncorrect:"{L('email').L('format_right')}"}).inputValidator({min:2,max:32,onerror:"{L('email').L('between_2_to_32')}"}).regexValidator({regexp:"email",datatype:"enum",onerror:"{L('email').L('format_incorrect')}"}).ajaxValidator({
	    type : "get",
		url : "",
		data :"m=member&c=index&a=public_checkemail_ajax",
		datatype : "html",
		async:'false',
		success : function(data){	
            if( data == "1" ) {
                return true;
			} else {
                return false;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "{L('deny_register').L('or').L('email_already_exist')}",
		onwait : "{L('connecting_please_wait')}"
	});
	$("#nickname").formValidator({onshow:"{L('input').L('nickname')}",onfocus:"{L('nickname').L('between_2_to_20')}"}).inputValidator({min:2,max:20,onerror:"{L('nickname').L('between_2_to_20')}"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"{L('nickname').L('format_incorrect')}"}).ajaxValidator({
			type : "get",
			url : "",
			data :"m=member&c=index&a=public_checknickname_ajax",
			datatype : "html",
			async:'false',
			success : function(data){
				if( data == "1" ) {
					return true;
				} else {
					return false;
				}
			},
			buttons: $("#dosubmit"),
			onerror : "{L('already_exist').L('already_exist')}",
			onwait : "{L('connecting_please_wait')}"
		});

	$(":checkbox[name='protocol']").formValidator({tipid:"protocoltip",onshow:"{L('read_protocol')}",onfocus:"{L('read_protocol')}"}).inputValidator({min:1,onerror:"{L('read_protocol')}"});

	{$formValidator}

	{if !isset($_GET['modelid']) && !isset($_GET['t']) && !empty($member_setting['showregprotocol'])}
		show_protocol();
	{/if}
});

function show_protocol() {
	art.dialog({lock:false,title:'{L('register_protocol')}',id:'protocoliframe', iframe:'{APP_PATH}index.php?m=member&c=index&a=register&protocol=1',width:'500',height:'310',yesText:'{L('agree')}'}, function(){
		$("#protocol").attr("checked",true);
	});
}

//-->
</script>
<div class="content">
  <div class="member_reg">
  <h1>注册走走网</h1>
<form method="post" action="" id="myform">
	<input type="hidden" name="siteid" value="{$siteid}" />         
		<div class="reg_txt">
          <label for="">注册账号:</label>
          <input name="username" type="text"  class="text" id="username" /> 
         </div>
		<div class="reg_txt">
          <label for="">登录密码:</label>
         <input name="password" type="password"  class="text" id="password" />
      </div>
		<div class="reg_txt">
          <label for="">登录密码:</label>
         <input name="pwdconfirm" type="password"  class="text" id="pwdconfirm" />
      </div>
		<div class="reg_txt">
          <label for="">注册邮箱:</label>
		  <input name="email" type="text"  class="text" id="email" /> 
      	</div>
		<div class="reg_txt">
          <label for="" style="padding-left:14px;">验证码:</label>
		  <input type="text" id="code" name="code" size="10" class="code_text"> {form::checkcode('code_img', '4', '14', 100, 32)} 
      	</div>
        <div id="reg_rule"><input type="checkbox" name="protocol" id="protocol" value=""><a href="javascript:void(0);" onclick="show_protocol();return false;" class="blue">{L('click_read_protocol')}</a></div>
        <div class="submit"><input type="submit" name="dosubmit" value="{L('agree_protocol_post')}"></div>
    </form>
  </div>
   <!--member_login end-->
   <div class="login_fast">
     <h2>用以下帐号直接登录</h2>
       <ul>
         {if get_login_show('sina_akey')}<li><span class="xlwb_ico"></span><a href="#">新浪微博</a></li>{/if}
         {if get_login_show('rr_akey')}<li><span class="rrw_ico"></span><a href="#">人人网</a></li>{/if}
         {if get_login_show('qq_akey')}<li><span class="txwb_ico"></span><a href="#">腾讯微博</a></li>{/if}
       </ul>
   </div>
</div>
{template 'content', 'footer'}











